﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FinalMCode.aspx.cs" Inherits="RGPWEB.admin.MCode.FinalMCode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>成品、半成品BOM查询</title>
    <link href="../../inc/Style/index.css" rel="stylesheet" type="text/css" />
    <link href="../../inc/Style/childindex.css" rel="stylesheet" type="text/css" />
    <link href="../../inc/Style/GridView.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 322px;
        }
        .style3
        {
            width: 118px;
        }
        .style5
        {
            width: 82px;
        }
        .style7
        {
            width: 34px;
        }
        .style8
        {
            width: 54px;
        }
        </style>
</head>
<body>
<script type="text/javascript">
        //左侧工具栏切换
        function on_tool() {
            var leftdiv = document.getElementById("leftdiv");
            var splitdiv = document.getElementById("splitdiv");
            var rightdiv = document.getElementById("rightdiv");
            var frameshow = document.getElementById("frameshow");
            //判断菜单是否隐藏
            if (leftdiv.style.display == "none") {
                leftdiv.style.display = "block";
                frameshow.src = "../../inc/images/splitter_horCol.gif";
            }
            else {
                leftdiv.style.display = "none";
                frameshow.src = "../../inc/images/splitter_horExp.gif";
            }
        }

        //自动适应内容大小
        function changewin() {
            var modulePanel = document.getElementById("modulePanel");
            modulePanel.style.height = window.frames["modulePanel"].document.body.scrollHeight;
        }

        window.onresize = function() {
            changewin();
        }        

    </script>
    <form id="form1" runat="server">
      <div>
    <asp:Panel ID="TitlePanel" runat="server" CssClass="titlePadding" Height="21px" 
        Width="1261px">
        成品、半成品物料编码原则
    </asp:Panel> 
 </div> 
 
 <div id="leftdiv">
            <div style="background-color: #e5e4e5; height: 22px; line-height: 22px;">
                <div style="float: left; margin-left: 5px; height: 22px; line-height: 22px;">
                    成品、半成品物料</div>
            </div>
            <div class="pbox5">
                <asp:TreeView ID="MenuTreeView" runat="server" ImageSet="Msdn" NodeIndent="10" 
                    onselectednodechanged="MenuTreeView_SelectedNodeChanged" ExpandDepth="1">
                    <ParentNodeStyle Font-Bold="False" />
                    <HoverNodeStyle BorderColor="#ff0000" />
                    <SelectedNodeStyle BorderColor="#888888" BorderStyle="Solid" BorderWidth="1px" Font-Underline="False"
                        HorizontalPadding="3px" VerticalPadding="1px" />
                    <NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
                        NodeSpacing="1px" VerticalPadding="2px" />
                </asp:TreeView>
                <a id="alink" href="Welcome.aspx" target="modulePanel" style=" display:none;"></a>
            </div>
        </div>
  <div id="splitdiv">
     <div style="background-color: #e5e4e5; float: right; height: 766px; width: 8px; text-align: left;
                padding-top: 3px;" onclick="on_tool();">
                <img alt="" id="frameshow" src="../../inc/images/splitter_horCol.gif" />
            </div>
        </div>
        
        <div id="rightdiv" style="font-size: small">
   <div>
      <table class="style1">
          <tr>
              <td class="style2">
                  <asp:Image ID="Image1" runat="server" 
                      ImageUrl="~/inc/images/MRuleImg/HJ_0A.png" />
              </td>
              <td>
                  &nbsp;</td>
          </tr>
      </table>
 </div>
    <div>
        <table class="style1">
            <tr>
                <td>
                    &nbsp;</td>
                <td class="style3">
                    <asp:TextBox ID="TextBox1" runat="server" Width="179px" Height="17px"></asp:TextBox>
                </td>
                <td class="style8">
                    <asp:Button ID="ButtonFind" runat="server" Text="查找" Width="73px" />
                </td>
                <td>
                    &nbsp;</td>
                <td class="style5">
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="16px" Width="186px" 
                        Visible="False">
                        <asp:ListItem Selected="True" Value="all">--选择料号--</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style7">
                    <asp:DropDownList ID="ddlFName" runat="server" Height="32px" Width="131px" 
                        AutoPostBack="True" DataSourceID="odsDdlFName" DataTextField="FName" 
                        DataValueField="FName" onselectedindexchanged="ddlFName_SelectedIndexChanged">
                        <asp:ListItem Selected="True" Value="all">--选择名称--</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                        RepeatDirection="Horizontal" Visible="False">
                        <asp:ListItem Selected="True" Value="all">全部</asp:ListItem>
                        <asp:ListItem Value="1">料号</asp:ListItem>
                        <asp:ListItem Value="2">名称</asp:ListItem>
                        <asp:ListItem Value="3">规格</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
        </table>
        <div> 
                            <asp:DropDownList ID="DropDownList3" runat="server" Height="18px" Width="809px" 
                                Visible="False">
                        <asp:ListItem Selected="True" Value="all">--选择规格--</asp:ListItem>
                    </asp:DropDownList>
        </div>
    </div>

      <div>
          <asp:GridView ID="GridView2" runat="server" BackColor="White" 
              BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
              ForeColor="Black" GridLines="Vertical" Width="100%">
              <RowStyle BackColor="#F7F7DE" />
              <FooterStyle BackColor="#CCCC99" />
              <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
              <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
              <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
              <AlternatingRowStyle BackColor="White" />
          </asp:GridView>
      </div>
      <div>
          <asp:GridView ID="GridView1" runat="server" BackColor="White" 
              BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
              ForeColor="Black" GridLines="Vertical" Width="100%" 
              AutoGenerateColumns="False" DataKeyNames="FItemID" AllowSorting="True" 
              onselectedindexchanged="GridView1_SelectedIndexChanged">
              <RowStyle BackColor="#F7F7DE" />
              <Columns>
                  <asp:CommandField ShowSelectButton="True">
                      <ItemStyle Width="30px" />
                  </asp:CommandField>
                  <asp:BoundField DataField="FNumber" HeaderText="料号" SortExpression="FNumber" />
                  <asp:BoundField DataField="FName" HeaderText="名称" SortExpression="FName" />
                  <asp:BoundField DataField="FModel" HeaderText="规格" SortExpression="FModel" />
                  <asp:BoundField DataField="FNote" HeaderText="备注" SortExpression="FNote" />
                  <asp:BoundField DataField="FItemID" HeaderText="FItemID" ReadOnly="True" 
                      SortExpression="FItemID" Visible="False" />
                  <asp:BoundField DataField="FDeleted" HeaderText="FDeleted" 
                      SortExpression="FDeleted" Visible="False" />
              </Columns>
              <FooterStyle BackColor="#CCCC99" />
              <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
              <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
              <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
              <AlternatingRowStyle BackColor="White" />
          </asp:GridView>
      </div>
      <div>
          <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
              ConnectionString="<%$ ConnectionStrings:AIS20101102153154ConnectionString %>" 
              
              
              SelectCommand="SELECT t_Item.FParentID, t_Item.FItemID, t_Item.FNumber, t_Item.FName, t_Item.FDeleted, t_Item.FLevel AS Flevel, t_Item.FItemClassID AS FitemClassID, t_ICItem.FModel FROM t_Item LEFT OUTER JOIN t_ICItem ON t_Item.FItemID = t_ICItem.FItemID WHERE (t_Item.FDeleted &lt;&gt; @FDeleted) AND (t_Item.FLevel &lt; @FLevel) AND (t_Item.FNumber LIKE 'HJ' + '%' OR t_Item.FNumber LIKE '06' + '%') AND (t_Item.FItemClassID = 4)">
              <SelectParameters>
                  <asp:QueryStringParameter DefaultValue="1" Name="FDeleted" 
                      QueryStringField="FDeleted" Type="Int16" />
                  <asp:QueryStringParameter DefaultValue="3" Name="FLevel" 
                      QueryStringField="FLevel" Type="Int16" />
              </SelectParameters>
          </asp:SqlDataSource>
          <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
              OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByFNumber" 
              TypeName="t_ICItemBLL">
              <SelectParameters>
                  <asp:ControlParameter ControlID="MenuTreeView" Name="FNumber" 
                      PropertyName="SelectedValue" Type="String" />
              </SelectParameters>
          </asp:ObjectDataSource>
          <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
              OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByFName" 
              TypeName="t_ICItemBLL">
              <SelectParameters>
                  <asp:ControlParameter ControlID="ddlFName" Name="FName" 
                      PropertyName="SelectedValue" Type="String" />
              </SelectParameters>
          </asp:ObjectDataSource>
          <asp:ObjectDataSource ID="odsDdlFName" runat="server" 
              OldValuesParameterFormatString="original_{0}" 
              SelectMethod="GetDataByDistinctFName" TypeName="t_ICItemBLL">
              <SelectParameters>
                  <asp:ControlParameter ControlID="MenuTreeView" Name="FNumber" 
                      PropertyName="SelectedValue" Type="String" />
              </SelectParameters>
          </asp:ObjectDataSource>
          <asp:ObjectDataSource ID="ObjectDataSource3" runat="server">
          </asp:ObjectDataSource>
      </div>
            </div>
 
</form>
</body>
</html>
